package com.g2d;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.view.View;

public class MyView extends View {
	
	private Paint paint;

	public MyView(Context context) {
		super(context);
		paint = new Paint();
		paint.setAntiAlias(true);
		setKeepScreenOn(true);
		paint.setColor(Color.GREEN);
	}

	@Override
	public void draw(Canvas canvas) {
		super.draw(canvas);
		canvas.drawColor(Color.WHITE);
		Rect rect = new Rect(30, 30, 50, 50);
		canvas.drawRect(rect, paint);
		RectF rectF = new RectF(70f, 30f, 90f, 90f);
		canvas.drawArc(rectF, 0, 360, true, paint);
		canvas.drawCircle(150, 30, 20, paint);
		float[] points =new float[]{200f,10f,200f,40f,300f,30f,400f,70f}; 
        canvas.drawLines(points, paint);
		canvas.drawText("Himi", 230, 30, paint);
	}

	
}
